//
//  GoodsDetailTableViewCell.m
//  StandardizedProduct
//
//  Created by 宁宁 on 16/6/28.
//  Copyright © 2016年 ym. All rights reserved.
//

#import "GoodsDetailTableViewCell.h"

#import "GoodsRecommendCollectionViewCell.h"

@implementation GoodsDetailTableViewCell
{
    UICollectionViewFlowLayout *_layout;
}

 static NSString *const GoodsRecommendCollectionViewCellID = @"GoodsRecommendCollectionViewCell";

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _layout = [[UICollectionViewFlowLayout alloc] init];
        _layout.minimumLineSpacing = 5;
        _layout.minimumInteritemSpacing = 0;
//        _layout.scrollDirection = UICollectionViewScrollDirectionVertical;
        
        _collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, 5000) collectionViewLayout:_layout];
        _collectionView.scrollEnabled = NO;
        _collectionView.backgroundColor = [UIColor clearColor];
        _collectionView.showsHorizontalScrollIndicator = NO;
        [self.contentView addSubview:_collectionView];
        
        [_collectionView registerNib:[UINib nibWithNibName:@"GoodsRecommendCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:GoodsRecommendCollectionViewCellID];
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
